<div class="modelportfolios view">
<h2><?php  echo __('View Portfolio'); ?></h2>

		<table>
		<tr>
		
		<th><?php echo __('Portfolio Name'); ?></th>
		<td>
			<?php echo h($modelportfolio['Modelportfolio']['PortfolioName']); ?>
			&nbsp;
		</td>
		</tr>
		
		<tr>
		<th><?php echo __('List of Funds'); ?></th>
		<td>
			<?php echo h($modelportfolio['Modelportfolio']['FundsList']); ?>
			&nbsp;
		</td>
		</tr>
		
		<tr>
        <th><?php echo __('List of Indices'); ?></th>
        <td>
            <?php echo h($modelportfolio['Modelportfolio']['IndexList']); ?>
            &nbsp;
        </td>
		</tr>
		
		<tr>
		<th><?php echo __('Date'); ?></th>
		<td>
			<?php echo h($modelportfolio['Modelportfolio']['Date']); ?>
			&nbsp;
		</td>
		</tr>
		<table>
		
		
		<table border="0.5">
<tr>
    <th colspan="2">Monthly Returns </th>
    <th colspan="2">Yearly Returns </th>
    <th>Since Inception Return </th>
  </tr>

<tr>
	<td>1 month</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['OneMonthReturn']); ?> &nbsp;</td>
	<td>1 year</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['OneYearReturn']); ?> &nbsp;</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['SinceInceptionReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td>3 month</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['ThreeMonthReturn']); ?> &nbsp;</td>
	<td>2 years</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['TwoYearReturn']); ?> &nbsp;</td>
</tr>


<tr>
	<td>6 month</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['SixMonthReturn']); ?> &nbsp;</td>
	<td>3 years</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['ThreeYearReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td></td>
	<td></td>
	<td>4 years</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['FourYearReturn']); ?> &nbsp;</td>
</tr>

<tr>
	<td></td>
	<td></td>
	<td>5 years</td>
	<td><?php echo h($modelportfolio['Modelportfolio']['FiveYearReturn']); ?> &nbsp;</td>
</tr>
</table>
</dl>

<table cellpadding="0" cellspacing="0">
	<tr>
		<th>Date</th>
		<th>Funds</th>
		<th>Indices</th>
		<th>1 Month</th>
		<th>3 Month</th>
		<th>6 Month</th>
		<th>1 Year</th>
		<th>2 Year</th>
		<th>3 Year</th>
		<th>4 Year</th>
		<th>5 Year</th>
		<th>Since Inception</th>
		<th></th>
	</tr>
	<?php
		$recordPortTotal=$this->Session->read("recordPortTotal");
		$recordPortPer=$this->Session->read("recordPortPer");
		echo "<h3>Displaying last 10 monthly records:</h3><h4>(".$recordPortTotal." records in total)</h4>";
		echo "<br>";
		for($n=0;$n<$recordPortTotal;$n++)
		{?>
			<tr><?php
			for($m=1;$m<$recordPortPer;$m++)
			{
				?>
				<td><?php echo $this->Session->read("record[".$n."][".$m."]") ?></td><?php
			}?>
			<td class="myButtons">
						<?php 
							//View Link
							//$this->Html->link( 'labelllll', array('controller'=>'Modelportfolios','action'=>'view', $modelportfolio['Modelportfolio']['PortfoliosID']), array('class'=>'btn'));
							echo "<a href=/DFS/modelportfolios/view/".$this->Session->read("record[".$n."][0]")."><img src=/DFS/img/view-btn.jpg alt=View/></a>";
							//echo $this->Html->image("view-btn.jpg", array( "alt" => "View", 'url' => array('action' => 'view', $managedfund['Managedfund']['FundsID']))); 
							//Edit Link 
							//echo "<a href=/DFS/managedfunds/edit/".$fundid."><img src=/DFS/img/edit-btn.jpg alt=Edit></a>";
						?>
			</tr>
			<?php
		}?>
</table>
</div>
